package com.yc.spring.vote;

import com.yc.spring.vote.dao.VoteDao;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

@Configuration
// 组件扫描
@ComponentScan("com.yc.spring.vote")
public class VoteConfig {

    @Bean("vDao")
    VoteDao voteDao(){
        VoteDao voteDao = new VoteDao();
        voteDao.setType("MySQL");
        return voteDao;
    }

}
